Skip to content

Conversation

@pelikhan
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

🤖 Codex PR Summary

Branch: pelikhan/codex3
Files Changed: 5

📋 Change Overview

  • Updates default Codex model to o4-mini (from gpt-4o)
  • Adjusts related tests and workflow docs
  • Adds passing of GITHUB_STEP_SUMMARY environment variable

📁 Files Modified

  • .github/workflows/agentics/shared/job-summary.md: Updated wording for job summary file location.
  • .github/workflows/test-codex.lock.yml: Updated wording; added GITHUB_STEP_SUMMARY env var.
  • .github/workflows/weekly-research.lock.yml: Updated wording.
  • pkg/workflow/codex_engine.go: Changed default model to o4-mini; injected GITHUB_STEP_SUMMARY env var.
  • pkg/workflow/codex_test.go: Updated test to expect model=o4-mini.

🔍 Key Changes

  • Default model change to o4-mini
  • Ensured workflows pass the summary env var
  • Tests aligned with new default

🎯 Recommendations

  • Verify backward compatibility for existing workflows.
  • Consider version bump if model change is breaking.
  • Add end-to-end test for summary file writing.

AI-generated content by Test Codex may contain mistakes.

@pelikhan pelikhan marked this pull request as ready for review August 13, 2025 00:26
@pelikhan pelikhan merged commit b1e064c into main Aug 13, 2025
9 checks passed
@pelikhan pelikhan deleted the pelikhan/codex3 branch August 13, 2025 00:26
github-actions bot added a commit that referenced this pull request Oct 16, 2025
…neration

**Alert Number**: #16
**Severity**: Critical (security_severity_level)
**Rule**: go/unsafe-quoting (CWE-78, CWE-89, CWE-94)

## Vulnerability Description

The code was directly embedding JSON-serialized domain arrays into a Python
script using fmt.Sprintf without proper escaping. While json.Marshal output
is typically safe for []string types, CodeQL correctly identified this as a
potential injection vector since the JSON content could theoretically contain
quotes that break out of the string context.

## Fix Applied

Changed the approach from embedding JSON as a Python literal to using Python's
json.loads() to parse the JSON at runtime:

1. Added proper escaping for backslashes and single quotes before embedding
2. Changed from `ALLOWED_DOMAINS = %s` (direct literal) to
   `ALLOWED_DOMAINS = json.loads('%s')` (runtime parsing)
3. Updated the escapedJSON variable usage in fmt.Sprintf

This eliminates any potential quoting vulnerabilities by:
- Explicitly escaping special characters (\ and ')
- Using json.loads() which safely handles all JSON content
- Making the security intent clearer in the code

## Security Best Practices

- Never embed user-controlled or serialized data directly into code literals
- Always use proper escaping mechanisms for the target language
- Prefer runtime parsing over literal embedding for complex data structures
- Escape backslashes first to prevent escape sequence interference

## Testing Considerations

- All existing tests pass with updated expectations
- The generated Python script correctly parses domain lists
- Empty domain lists (deny-all policy) are handled correctly
- Domain patterns with special characters are properly escaped

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
github-actions bot added a commit that referenced this pull request Oct 20, 2025
…#16)

Fixes CodeQL alert #16 (go/unsafe-quoting) with Critical security severity.

## Vulnerability Description

The code was embedding JSON-serialized domain arrays directly into a
Python script without proper escaping, creating a potential injection
vulnerability (CWE-78, CWE-89, CWE-94). If the JSON contains double
quotes or special characters, it could break out of the Python string
context and alter the script structure.

## Fix Applied

1. Added proper escaping for backslashes and single quotes
2. Changed from direct embedding to using Python's json.loads() at runtime
3. Updated test expectations to match the new secure format

## Security Best Practices Applied

- Never embed serialized data directly into code literals
- Always use proper escaping for the target language
- Prefer runtime parsing over literal embedding for complex data
- Escape backslashes first to prevent escape sequence interference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
github-actions bot added a commit that referenced this pull request Nov 20, 2025
**Alert Number**: #16
**Severity**: Critical
**Rule**: go/unsafe-quoting

## Vulnerability Description

The code was embedding JSON-serialized domain lists directly into a Python
script using string formatting without proper escaping. If the JSON contained
double quotes in an unexpected way, it could break out of the enclosing quotes
and potentially change the structure of the Python code.

## Fix Applied

1. Added `strconv.Quote()` to properly escape the JSON string before embedding
   it in the Python script template
2. Changed the Python code to use `json.loads()` to parse the escaped JSON
   string, making the approach more explicit and safer
3. Updated all related tests to check for the new escaped format

## Security Best Practices

- Using `strconv.Quote()` ensures that any special characters (including quotes)
  are properly escaped according to Go string literal rules
- Using `json.loads()` on the Python side makes the intent clear and provides
  an additional layer of safety by parsing the JSON in a structured way
- This prevents potential code injection vulnerabilities (CWE-78, CWE-89, CWE-94)

## Testing Considerations

All existing tests have been updated and pass successfully. The fix maintains
backward compatibility in terms of functionality while improving security.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
github-actions bot added a commit that referenced this pull request Nov 22, 2025
…eration (Alert #16)

Use json.loads() with triple-quoted strings instead of direct JSON embedding
to eliminate any potential quoting vulnerabilities when generating Python
network permission hooks. This prevents CWE-78, CWE-89, and CWE-94 injection
attacks that could occur if JSON contains quotes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
pelikhan pushed a commit that referenced this pull request Nov 22, 2025
…eration (Alert #16) (#4526)

Use json.loads() with triple-quoted strings instead of direct JSON embedding
to eliminate any potential quoting vulnerabilities when generating Python
network permission hooks. This prevents CWE-78, CWE-89, and CWE-94 injection
attacks that could occur if JSON contains quotes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant